<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>微信免挂小号设置</title>
	<link rel="stylesheet" href="<?=adminassets?>assets/pear/component/pear/css/pear.css" />
	<style>
	    .qr-message {
            font-size: 16px;
            color: #333;
            margin-bottom: 10px;
        }
        
        .qr-code {
            margin-bottom: 20px;
        }
        
        #Up_LoginQrcode img {
            width: 200px;
            height: 200px;
            border: 1px solid #ccc;
        }
	</style>
</head>
<body class="pear-container">
    <?php if ($my == "list") : ?>
    <div class="layui-card">
			<div class="layui-card-body">
				<blockquote class="layui-elem-quote">
					<h3>微信免挂小提示</h3>
					<p>下载微信店员小号监控框架插件->解压->打开微信站长监控->应用双击->填写域名->填写微信名字->登录微信->保存->运行挂钩。</p>
					<p>由于需要微信登录PC版的,手机上不能退出也不能切换账号,可以直接卸载微信,重下载然后登录其他微信号,也能保持在线(比较麻烦点)</p>
					<p>用户发送邀请连接的时候需手动接受(客户量大可以联系作者弄自动绑定[收费])</p><br>
					<div class="layui-input-item">
						<a style="margin-left: 15px;" href="http://gx.daoh.top/wxapp/dianyuan.zip" class="layui-btn layui-btn-sm layui-btn-normal">店员插件下载</a>
						<a href="http://gx.daoh.top/wxapp/wxapp.zip" class="layui-btn layui-btn-sm layui-btn-normal">微信安装包</a>
						<!--<a id="lookAtClon" class="layui-btn layui-btn-sm layui-btn-normal">点击查看云端店员监控</a>-->
						<a id="txtoken" class="layui-btn layui-btn-sm layui-btn-normal">获取PC通讯token</a>
					</div>
				</blockquote>

				<table id="news" lay-filter="news"></table>
			</div>
		</div>

		<script type="text/html" id="toolbar">
			<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="add">
				<i class="layui-icon layui-icon-add-1"></i>
				新增
			</button>
			<button class="pear-btn pear-btn-primary pear-btn-md" lay-event="force_bind">
				<i class="layui-icon layui-icon-add-1"></i>
				强制绑定
			</button>
		</script>

		<script type="text/html" id="status">
			<input type="checkbox" name="status" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用" lay-filter="status" {{# if(d.status==1){ }} checked {{# } }}>
		</script>

		<script type="text/html" id="options">
			<button class="pear-btn pear-btn-primary pear-btn-sm" lay-event="edit"><i class="layui-icon layui-icon-edit"></i></button>
			<button class="pear-btn pear-btn-danger pear-btn-sm" lay-event="remove"><i class="layui-icon layui-icon-delete"></i></button>
		</script>
    <?php endif; ?>	
    <?php if ($my == "add") : ?>
        <!-- 添加数据 -->
		<div class="layui-form">
			<div class="mainBox">
				<div class="main-container">
					<div class="layui-form-item">
						<label class="layui-form-label">
							挂机方式
						</label>
						<div class="layui-input-block">
							<select id="mode">
								<option value="2">PC挂机</option>
							</select>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">
							微信账号
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="wx_user" placeholder="必填项" type="text" value="" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">
							微信昵称
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="wx_name" placeholder="必填项" type="text" value="" />
							<p>(名称要与微信里的完全符合,不要花里胡哨,不可重复,不可带图标或者特殊符号)</p>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">
							微信备注
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="beizhu" placeholder="可留空" type="text" value="" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">
							排序（越小越靠前）
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="sort" placeholder="必填项" type="text" value="50" />
						</div>
					</div>
				</div>
			</div>
			<div class="bottom">
				<div class="button-container">
					<button id="addUser" class="layui-btn layui-btn-normal layui-btn-sm">
						<i class="layui-icon layui-icon-ok"></i>
						提交
					</button>
					<button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
						<i class="layui-icon layui-icon-refresh"></i>
						重置
					</button>
				</div>
			</div>
		</div>
    <?php endif; ?>	
    <?php if ($my == "edit") : ?>
<div class="layui-form">
			<div class="mainBox">
				<div class="main-container">
					<input type="hidden" id="id" value="<?= $id ?>" />
					<div class="layui-form-item">
						<label class="layui-form-label">
							微信账号
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="wx_user" placeholder="必填项" value="<?= $row['wx_user'] ?>" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">
							微信昵称
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="wx_name" placeholder="必填项" value="<?= $row['wx_name'] ?>" />
							<p>(名称要与微信里的完全符合,不要花里胡哨,不可重复,不可带图标或者特殊符号)</p>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">
							微信备注
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="beizhu" placeholder="可留空"  value="<?= $row['beizhu'] ?>" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">
							排序（越小越靠前）
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="sort" placeholder="必填项" value="<?= $row['sort'] ?>" />
						</div>
					</div>
				</div>
			</div>
			<div class="bottom">
				<div class="button-container">
					<button id="editUser" class="layui-btn layui-btn-normal layui-btn-sm">
						<i class="layui-icon layui-icon-ok"></i>
						提交
					</button>
					<button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
						<i class="layui-icon layui-icon-refresh"></i>
						重置
					</button>
				</div>
			</div>
		</div>
<?php endif; ?>
<?php if ($my == "force_bind") : ?>
<!-- 添加数据 -->
		<div class="layui-form">
			<div class="mainBox">
				<div class="main-container">
				
					<div class="layui-form-item">
						<label class="layui-form-label">
							用户收款名
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="wx_username" placeholder="必填项" value="" />
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">
							店员名称
						</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" id="wx_dyname" placeholder="必填项"  value="" />
						</div>
					</div>
				</div>
			</div>
			<div class="bottom">
				<div class="button-container">
					<button id="addforce_bind" class="layui-btn layui-btn-normal layui-btn-sm">
						<i class="layui-icon layui-icon-ok"></i>
						提交
					</button>
					<button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
						<i class="layui-icon layui-icon-refresh"></i>
						重置
					</button>
				</div>
			</div>
		</div>
<?php endif; ?>
<?php if ($my == "tc") : ?>
    <blockquote style="margin: 15px;" class="layui-elem-quote">
        <p>复制以下内容即可 注意这个token 是另外一个软件的 不是你能下载的软件token</p>
        <textarea  class="layui-textarea" id="tokenText" readonly><?=$token?></textarea>
    </blockquote>
<?php endif; ?>  
<script src="<?=adminassets?>assets/pear/component/layui/layui.js"></script>
<script src="<?=adminassets?>assets/pear/component/pear/pear.js"></script>
<script type="text/javascript" src="../Core/assets/js/jquery.min.js"></script>
<script src="<?=adminassets?>assets/js/core_js/Wechat_Trumpet.js"></script>